3.227 \(\int \frac{x^2 (a+b \log (c x^n))}{(d+e x^2)^2} \, dx\)

Optimal. Leaf size=164 \[ -\frac{i b n \text{PolyLog}\left (2,-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{4 \sqrt{d} e^{3/2}}+\frac{i b n \text{PolyLog}\left (2,\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{4 \sqrt{d} e^{3/2}}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 \sqrt{d} e^{3/2}}-\frac{x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac{b n \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} e^{3/2}} \]

[Out]

(b*n*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(2*Sqrt[d]*e^(3/2)) - (x*(a + b*Log[c*x^n]))/(2*e*(d + e*x^2)) + (ArcTan[(Sq
rt[e]*x)/Sqrt[d]]*(a + b*Log[c*x^n]))/(2*Sqrt[d]*e^(3/2)) - ((I/4)*b*n*PolyLog[2, ((-I)*Sqrt[e]*x)/Sqrt[d]])/(
Sqrt[d]*e^(3/2)) + ((I/4)*b*n*PolyLog[2, (I*Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.269079, antiderivative size = 164, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 8, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.348, Rules used = {288, 205, 2351, 2323, 2324, 12, 4848, 2391} \[ -\frac{i b n \text{PolyLog}\left (2,-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{4 \sqrt{d} e^{3/2}}+\frac{i b n \text{PolyLog}\left (2,\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{4 \sqrt{d} e^{3/2}}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 \sqrt{d} e^{3/2}}-\frac{x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac{b n \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} e^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(a + b*Log[c*x^n]))/(d + e*x^2)^2,x]

[Out]

(b*n*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(2*Sqrt[d]*e^(3/2)) - (x*(a + b*Log[c*x^n]))/(2*e*(d + e*x^2)) + (ArcTan[(Sq
rt[e]*x)/Sqrt[d]]*(a + b*Log[c*x^n]))/(2*Sqrt[d]*e^(3/2)) - ((I/4)*b*n*PolyLog[2, ((-I)*Sqrt[e]*x)/Sqrt[d]])/(
Sqrt[d]*e^(3/2)) + ((I/4)*b*n*PolyLog[2, (I*Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^(3/2))

Rule 288

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^
n)^(p + 1))/(b*n*(p + 1)), x] - Dist[(c^n*(m - n + 1))/(b*n*(p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2323

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^2)^(q_), x_Symbol] :> -Simp[(x*(d + e*x^2)^(q + 1
)*(a + b*Log[c*x^n]))/(2*d*(q + 1)), x] + (Dist[(2*q + 3)/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1)*(a + b*Log[c*
x^n]), x], x] + Dist[(b*n)/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1), x], x]) /; FreeQ[{a, b, c, d, e, n}, x] &&
LtQ[q, -1]

Rule 2324

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx &=\int \left (-\frac{d \left (a+b \log \left (c x^n\right )\right )}{e \left (d+e x^2\right )^2}+\frac{a+b \log \left (c x^n\right )}{e \left (d+e x^2\right )}\right ) \, dx\\ &=\frac{\int \frac{a+b \log \left (c x^n\right )}{d+e x^2} \, dx}{e}-\frac{d \int \frac{a+b \log \left (c x^n\right )}{\left (d+e x^2\right )^2} \, dx}{e}\\ &=-\frac{x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d} e^{3/2}}-\frac{\int \frac{a+b \log \left (c x^n\right )}{d+e x^2} \, dx}{2 e}+\frac{(b n) \int \frac{1}{d+e x^2} \, dx}{2 e}-\frac{(b n) \int \frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{d} \sqrt{e} x} \, dx}{e}\\ &=\frac{b n \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} e^{3/2}}-\frac{x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 \sqrt{d} e^{3/2}}-\frac{(b n) \int \frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{\sqrt{d} e^{3/2}}+\frac{(b n) \int \frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{d} \sqrt{e} x} \, dx}{2 e}\\ &=\frac{b n \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} e^{3/2}}-\frac{x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 \sqrt{d} e^{3/2}}-\frac{(i b n) \int \frac{\log \left (1-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{2 \sqrt{d} e^{3/2}}+\frac{(i b n) \int \frac{\log \left (1+\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{2 \sqrt{d} e^{3/2}}+\frac{(b n) \int \frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{2 \sqrt{d} e^{3/2}}\\ &=\frac{b n \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} e^{3/2}}-\frac{x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 \sqrt{d} e^{3/2}}-\frac{i b n \text{Li}_2\left (-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} e^{3/2}}+\frac{i b n \text{Li}_2\left (\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} e^{3/2}}+\frac{(i b n) \int \frac{\log \left (1-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{4 \sqrt{d} e^{3/2}}-\frac{(i b n) \int \frac{\log \left (1+\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{4 \sqrt{d} e^{3/2}}\\ &=\frac{b n \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} e^{3/2}}-\frac{x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 \sqrt{d} e^{3/2}}-\frac{i b n \text{Li}_2\left (-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{4 \sqrt{d} e^{3/2}}+\frac{i b n \text{Li}_2\left (\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{4 \sqrt{d} e^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.526648, size = 258, normalized size = 1.57 \[ \frac{\frac{b n \text{PolyLog}\left (2,\frac{\sqrt{e} x}{\sqrt{-d}}\right )}{\sqrt{-d}}+\frac{b d n \text{PolyLog}\left (2,\frac{d \sqrt{e} x}{(-d)^{3/2}}\right )}{(-d)^{3/2}}+\frac{d \log \left (\frac{\sqrt{e} x}{\sqrt{-d}}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{(-d)^{3/2}}+\frac{\log \left (\frac{d \sqrt{e} x}{(-d)^{3/2}}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{-d}}+\frac{a+b \log \left (c x^n\right )}{\sqrt{-d}-\sqrt{e} x}-\frac{a+b \log \left (c x^n\right )}{\sqrt{-d}+\sqrt{e} x}+\frac{b d n \left (\log (x)-\log \left (\sqrt{-d}-\sqrt{e} x\right )\right )}{(-d)^{3/2}}+\frac{b n \left (\log (x)-\log \left (\sqrt{-d}+\sqrt{e} x\right )\right )}{\sqrt{-d}}}{4 e^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(a + b*Log[c*x^n]))/(d + e*x^2)^2,x]

[Out]

((a + b*Log[c*x^n])/(Sqrt[-d] - Sqrt[e]*x) - (a + b*Log[c*x^n])/(Sqrt[-d] + Sqrt[e]*x) + (b*d*n*(Log[x] - Log[
Sqrt[-d] - Sqrt[e]*x]))/(-d)^(3/2) + (b*n*(Log[x] - Log[Sqrt[-d] + Sqrt[e]*x]))/Sqrt[-d] + (d*(a + b*Log[c*x^n
])*Log[1 + (Sqrt[e]*x)/Sqrt[-d]])/(-d)^(3/2) + ((a + b*Log[c*x^n])*Log[1 + (d*Sqrt[e]*x)/(-d)^(3/2)])/Sqrt[-d]
 + (b*n*PolyLog[2, (Sqrt[e]*x)/Sqrt[-d]])/Sqrt[-d] + (b*d*n*PolyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)])/(-d)^(3/2))/
(4*e^(3/2))

________________________________________________________________________________________

Maple [C]  time = 0.327, size = 752, normalized size = 4.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*ln(c*x^n))/(e*x^2+d)^2,x)

[Out]

-1/2*b/e*x/(e*x^2+d)*ln(x^n)-1/2*b/e/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*n*ln(x)+1/2*b/e/(d*e)^(1/2)*arctan(x*
e/(d*e)^(1/2))*ln(x^n)+1/2*b*n/e/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))-1/4*b*n*ln(x)/(e*x^2+d)/(-d*e)^(1/2)*ln((
-e*x+(-d*e)^(1/2))/(-d*e)^(1/2))*x^2+1/4*b*n*ln(x)/(e*x^2+d)/(-d*e)^(1/2)*ln((e*x+(-d*e)^(1/2))/(-d*e)^(1/2))*
x^2-1/4*b*n*d/e*ln(x)/(e*x^2+d)/(-d*e)^(1/2)*ln((-e*x+(-d*e)^(1/2))/(-d*e)^(1/2))+1/4*b*n*d/e*ln(x)/(e*x^2+d)/
(-d*e)^(1/2)*ln((e*x+(-d*e)^(1/2))/(-d*e)^(1/2))+1/4*b*n/e/(-d*e)^(1/2)*dilog((-e*x+(-d*e)^(1/2))/(-d*e)^(1/2)
)-1/4*b*n/e/(-d*e)^(1/2)*dilog((e*x+(-d*e)^(1/2))/(-d*e)^(1/2))+1/2*b*n/e/(-d*e)^(1/2)*ln(x)*ln((-e*x+(-d*e)^(
1/2))/(-d*e)^(1/2))-1/2*b*n/e/(-d*e)^(1/2)*ln(x)*ln((e*x+(-d*e)^(1/2))/(-d*e)^(1/2))-1/4*I*b*Pi*csgn(I*c*x^n)^
2*csgn(I*c)/e*x/(e*x^2+d)+1/4*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)/e*x/(e*x^2+d)-1/4*I*b*Pi*csgn(I*x^n)*
csgn(I*c*x^n)*csgn(I*c)/e/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))+1/4*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/e/(d*e)^(
1/2)*arctan(x*e/(d*e)^(1/2))+1/4*I*b*Pi*csgn(I*c*x^n)^3/e*x/(e*x^2+d)-1/4*I*b*Pi*csgn(I*c*x^n)^3/e/(d*e)^(1/2)
*arctan(x*e/(d*e)^(1/2))-1/4*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/e*x/(e*x^2+d)+1/4*I*b*Pi*csgn(I*c*x^n)^2*csgn(
I*c)/e/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))-1/2*b*ln(c)/e*x/(e*x^2+d)+1/2*b*ln(c)/e/(d*e)^(1/2)*arctan(x*e/(d*e
)^(1/2))-1/2*a/e*x/(e*x^2+d)+1/2*a/e/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b x^{2} \log \left (c x^{n}\right ) + a x^{2}}{e^{2} x^{4} + 2 \, d e x^{2} + d^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="fricas")

[Out]

integral((b*x^2*log(c*x^n) + a*x^2)/(e^2*x^4 + 2*d*e*x^2 + d^2), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} \left (a + b \log{\left (c x^{n} \right )}\right )}{\left (d + e x^{2}\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*ln(c*x**n))/(e*x**2+d)**2,x)

[Out]

Integral(x**2*(a + b*log(c*x**n))/(d + e*x**2)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )} x^{2}}{{\left (e x^{2} + d\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*x^2/(e*x^2 + d)^2, x)